package com.njym.java.security.admin.mapper;

import com.njym.java.security.admin.entity.User;
import com.njym.java.security.admin.entity.UserVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface UserMapper extends Mapper<User> {
    public List<User> selectMemberByGroupId(@Param("groupId") int groupId);
    public List<User> selectLeaderByGroupId(@Param("groupId") int groupId);

    List<User> queryClub();

    List<UserVo> cicleMasterList(@Param("name") String name);

    int countMasterList(@Param("name") String name);

    List<UserVo> cicleFriendList(@Param("name") String name, @Param("pid") Integer pid);

    int countFriendList(@Param("name") String name, @Param("pid") Integer pid);

    List<UserVo> teacherList(@Param("name") String name, @Param("pid") Integer pid);

    int countTeacherList(@Param("name") String name, @Param("pid") Integer pid);

    /**
     * 开启或关闭代理
     * @param status
     * @param id
     * @return
     */
    int updateDaiLi(@Param("status") String status, @Param("id") Integer id);
}